package com.baoyang.service;

import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.baoyang.entity.BaoyangUser;
import com.baoyang.entity.Container;
import com.baomidou.mybatisplus.extension.service.IService;
import com.baoyang.entity.vo.BatchSetArrivalStationReqVO;
import com.baoyang.entity.vo.DashboardRespVO;
import com.baoyang.entity.vo.ExportContainerByStatusReqVO;
import com.baoyang.entity.vo.ExportContainerReqVO;
import com.baoyang.entity.vo.MyTransportationCountRespVO;
import com.baoyang.entity.vo.PcUnloadCountRespVO;
import com.baoyang.entity.vo.ProductNameCountRespVO;
import org.springframework.web.multipart.MultipartFile;

import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import java.time.LocalDate;
import java.util.List;

/**
 * <p>
 * 货柜信息表 服务类
 * </p>
 *
 * @author 金佳军
 * @since 2025-07-05
 */
public interface IContainerService extends IService<Container> {

    IPage<Container> pageContainerList(Page<Container> page, String boxNo, Long productNameId, String shippingStation, String arrivalStation, String shipmentDate, Long driverId,
                                       Integer transportationStatus,
                                       Integer type, String dataScope);

    boolean addContainer(Container container);

    boolean setArrivalStation(Container container);

    boolean commit(Container container);

    Container queryUserContainer(Long userId);

    boolean cancel(Container container);

    IPage<Container> getAllArrivedPage(Page<Container> page, Long projectNameId, Integer transportationStatus,
                                       String boxNo, String dataScope);

    DashboardRespVO dashboard();

    IPage<Container> dashboardList(Page<Container> page, Long projectNameId, Integer transportationStatus);

    IPage<Container> todayUnloadList(Page<Container> page, String driverName);

    boolean unload(Container container);

    IPage<Container> myTransportationPageList(Page<Container> page, String boxNo, String startTime, String endTime);

    MyTransportationCountRespVO myTransportationCount();

    IPage<Container> fishingBoxTrackingPageList(Page<Container> page, String boxNo, Long productNameId);

    IPage<ProductNameCountRespVO> productNameNotArrivedCount(Integer pageNum, Integer pageSize,
                                                             Integer transportationStatus);

    IPage<Container> getUnloadedContainersByDriverIdPageList(Page<Container> page, String startTime, String endTime,
                                                             String id);

    List<PcUnloadCountRespVO> pcUnloadCount();

    IPage<Container> pcUnloadPageList(Page<Container> page);

    boolean batchSetArrivalStation(List<BatchSetArrivalStationReqVO> reqVOS);

    boolean editContainer(Container container);

    boolean importByExcel(MultipartFile file);

    /**
     * 导出货柜Excel
     */
    void exportContainerExcel(ExportContainerReqVO reqVO, HttpServletResponse response);

    boolean batchDelete(List<String> ids);

    void exportExcelByStatus(ExportContainerByStatusReqVO reqVO, HttpServletResponse response);

}
